﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using ERP.Common.DTO;
using ERP.ERPSystem.ProductionSystem.Dto;

namespace ERP.ERPSystem.ProductionSystem
{
    /// <summary>
    /// 供应商管理服务接口
    /// </summary>
    public interface ISupplierServer : IApplicationService
    {
        /// <summary>
        /// 分页查询供应商列表（支持多条件和状态筛选）
        /// </summary>
        /// <param name="keyword">供应商名称或编号关键词</param>
        /// <param name="isEnabled">是否启用</param>
        /// <param name="page">页码</param>
        /// <param name="pageSize">每页数量</param>
        /// <returns>分页结果</returns>
        Task<PagedResult<SupplierDTO>> GetPagedListAsync(string keyword = null, bool? isEnabled = null, int page = 1, int pageSize = 10);

        /// <summary>
        /// 根据ID获取供应商详情
        /// </summary>
        Task<SupplierDTO> GetByIdAsync(int id);

        /// <summary>
        /// 新增或修改供应商
        /// </summary>
        Task<bool> SaveAsync(SupplierDTO entity);

        /// <summary>
        /// 删除供应商
        /// </summary>
        Task<bool> DeleteAsync(int id);

        /// <summary>
        /// 批量删除供应商
        /// </summary>
        Task<bool> DeleteBatchAsync(List<int> ids);
    }
}
